﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using iLangl.Tests.SerializationFixture;
using iLangl.Model;
using iLangl.BusinessModel.Managers;

namespace iLangl.Tests.DALFixture
{
	[TestClass]
	public class CompanyDALFixture : CompanyValidationTest
	{
		[TestMethod]
		public void CompanyDAL()
		{
			Company company = GetCompany();
			CompanyRequestContext requestContext = new CompanyRequestContext();

			requestContext.SetContext(company);

			String sCompany = requestContext.GetContext().ToString();

			Company origincompany = CompanyManager.Instance.GetCompany(TestSettings.LanguageWireCompanyId);
			requestContext.SetContext(origincompany);

			String sOriginCompany = requestContext.GetContext().ToString();
			Assert.AreEqual(origincompany, sOriginCompany);
		}
	}
}
